-
Notifications
You must be signed in to change notification settings - Fork 72
feat: update deps and support mongo v7 #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe pull request introduces updates to dependency versions and improves asynchronous handling in the test suites. In the Sequence Diagram(s)sequenceDiagram
participant T as Test Runner
participant B as beforeAll Hook
participant D as dbUtils.start()
T->>B: Start test setup
B->>D: Invoke start() and await result
D-->>B: Return MongoMemoryServer instance
B->>T: Complete setup with mongod instance
sequenceDiagram
participant F as Test Function
participant C as db() Function
participant M as MongoClient
F->>C: Request database connection
C->>M: Call MongoClient.connect(uri)
M-->>C: Return connected client
C-->>F: Provide connection details (using mongod.instanceInfo)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
🔇 Additional comments (14)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
BREAKING CHANGE: Updated to MongoDB driver v6 which requires: - BSON types must be from version 6.x - Node.js version compatible with MongoDB 6.x - Updated connection patterns and BSON handling - Removed support for deprecated methods Signed-off-by: Alejandro Dominguez <[email protected]>
94aa7c9
to
42aa306
Compare
@@ -16,7 +16,7 @@ | |||
"semantic-release": "SEMANTIC_COMMITLINT_SKIP=f4543f643bac890c627d538e6200c5f5a1d45ebc semantic-release", | |||
"test": "npm run test:mongoist && npm run test:native", | |||
"test:mongoist": "DRIVER=mongoist jest --forceExit", | |||
"test:native": "DRIVER=native jest && DRIVER=native DRIVER_VERSION=v3 jest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Alejandro Dominguez [email protected]
📚 Context/Description Behind The Change
This PR updates the MongoDB driver and related dependencies to their latest stable versions, along with necessary code modifications to support these updates. The changes include modernizing the test suite to use async/await syntax consistently and updating BSON handling.
Dependency updates:
bson
: ^6.10.3mongodb
: ^6.15.0mongodb-memory-server
: ^10.1.4mongoist
: ^4.0.1mongoose
: ^8.12.2Code changes:
mongo.ObjectID
withnew ObjectId()
Breaking Changes
🚨 Potential Risks & What To Monitor After Deployment
Not retrocompatible, breaking changes
🧑🔬 How Has This Been Tested?
🚚 Release Plan